<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="../cultuurschuur/master.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="title">
        Login
    </ui:define>
    
    <ui:define name="content">
        <h1>Login</h1>
        <h:form>

            <table>
                <tr>
                    <td>Email: </td>
                    <td>
                                    <p:inputText id="email"  value="#{klantController.email}" validatorMessage="Email niet ingevult">
                            <f:validateLength minimum="2" /> 
                            <f:validateRequired /> 
                        </p:inputText>
                    </td>
                </tr>
                <tr>
                    <td>Paswoord: </td>
                    <td>
                        <p:password id="paswoord" value="#{klantController.paswoord}" validatorMessage="Paswoord niet ingevult">
                            <f:validateRequired /> 
                        </p:password>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"> <h:commandButton value="Inloggen" action="#{klantController.inloggen()}" /></td>
                </tr>
            </table>

        </h:form>
        <h:outputText value="#{klantController.error}" rendered="#{klantController.error != null}"/>
    </ui:define>
    
</ui:composition>
